import React, { memo } from 'react';
import styles from './index.less';
import { IButtonConfig } from './schema';

interface IProps extends IButtonConfig {}

const XButton = memo((props: IProps) => {
  const { borderColor, borderWidth, round, padding, content } = props;

  return (
    <div
      className={styles.richTextWrap}
      style={{
        border: `${borderWidth}px solid ${borderColor}`,
        borderRadius: round + 'px',
        padding: padding + 'px',
      }}
    >
      <div dangerouslySetInnerHTML={{ __html: content }}></div>
    </div>
  );
});
export default XButton;
